//
//  PywAlertView.h
//  PywSdk
//
//  Created by Jade on 4/8/16.
//  Copyright © 2016 zero. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,MessageAlignment) {
    MessageAlignmentHorizontal = 0,
    MessageAlignmentVertical = 1,
};


@class PywAlertView;
@protocol PywAlertViewDelegate <NSObject>

/**
 *  select Button
 *
 *  @param alertView   this AlertView
 *  @param buttonIndex select  ButtonIndex
 */
- (void)alertView:(PywAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;

@optional
/**
 *  cancel
 *
 *  @param alertView <#alertView description#>
 */
- (void)alertViewCancel:(PywAlertView *)alertView;
@end

@interface PywAlertView : UIView
@property (nonatomic,assign) id<PywAlertViewDelegate> delegate;

- (instancetype)initWithTitle:(NSString *)title
                      message:(NSString *)message
                   subMessage:(NSString *)subMessage
                 messageImage:(NSString *)messageImage
             messageAlignment:(MessageAlignment)messageAlignment
                     delegate:(id<PywAlertViewDelegate>)delegate
            cancelButtonTitle:(NSString *)cancelButtonTitle
              sureButtonTitle:(NSString *)sureButtonTitle;

/**
 *  显示提示框
 */
- (void)show;

/**
 *  添加到指定的view上
 */
- (void)show:(UIView *)view;
@end
